package com.wyg.study.demo.log;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * Log4j2 是 log4j的升级 通过log4j2.xml读取配置
 * @author yg.wang
 * @description:
 * @date 2019/8/5 19:37
 */
public class Log4j2Test {
    /**
     *使用log4j自身API创建Logger对象
     */
    private static Logger logger = LogManager.getLogger(Log4j2Test.class);

    public static void main(String[] args) {

        logger.info("这是一条info日志");
        logger.error("这是一条error日志");

    }
}
